Skip to contentSkip to conversation

Change in openvpn[master]: multi: Remove useless checks

Openvpn-devel flichtenheld (Code Review) 1 participant 1 message May 6 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1778102459000.If58bb807842b7b95aeffe6849e7a7344e4925762@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1667?usp=email

to review the following change.

Change subject: multi: Remove useless checks
......................................................................

multi: Remove useless checks

If mi is NULL, the previous code lines already
segfaulted.

Identified by cppcheck.

Change-Id If58bb807842b7b95aeffe6849e7a7344e4925762

---
M src/openvpn/multi.c

1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/67/1667/1

src/openvpn/multi.c +2 -2
index 06e3758..a957fdf 100644
@@ -3054,8 +3054,8 @@
 
 #ifdef MULTI_DEBUG_EVENT_LOOP
         printf("POST %s[%d] to=%d lo=%d/%d w=%" PRIi64 "/%ld\n", id(mi), (int)(mi == m->pending),
-               mi ? mi->context.c2.to_tun.len : -1, mi ? mi->context.c2.to_link.len : -1,
-               (mi && mi->context.c2.fragment) ? mi->context.c2.fragment->outgoing.len : -1,
+               mi->context.c2.to_tun.len, mi->context.c2.to_link.len,
+               mi->context.c2.fragment ? mi->context.c2.fragment->outgoing.len : -1,
                (int64_t)mi->context.c2.timeval.tv_sec, (long)mi->context.c2.timeval.tv_usec);
 #endif
     }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1667?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: If58bb807842b7b95aeffe6849e7a7344e4925762
Gerrit-Change-Number: 1667
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>